Skip to content

Lock reads and writes to session map #1970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2018

Conversation

morganchen12
Copy link
Contributor

@morganchen12 morganchen12 commented Oct 19, 2018

Potentially fix #1964.

TAP runs over at cr/217930814.

@paulb777
Copy link
Member

Any particular reason for NSLock versus GCD or @synchronized?

@morganchen12
Copy link
Contributor Author

I wanted an explicit object to lock/unlock on rather than an implicit lock associated with a class instance or something. This isn't a hugely important decision, and I can rewrite to use @synchronized if preferable.

@ryanwilson
Copy link
Member

I think this may be causing a deadlock based on Travis. Please try to catch this locally if you can to make sure we aren't causing a deadlock anywhere.

Using NSLock is good with me, or I started an implementation with GCD if locking is causing issues (I'd prefer to avoid @synchronized).

@morganchen12
Copy link
Contributor Author

Fixed deadlock and passed travis.

@morganchen12 morganchen12 merged commit b68f0f9 into firebase:master Oct 23, 2018
@morganchen12 morganchen12 deleted the urlsession branch October 23, 2018 16:49
@firebase firebase locked and limited conversation to collaborators Oct 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GULNetworkURLSession crashes
4 participants